/* indent size: 2 */

module.exports = app => {
  const DataTypes = app.Sequelize;

  const Model = app.model.define('ims_crl_tpshop_product', {
    id: {
      type: DataTypes.INTEGER(11),
      allowNull: false,
      primaryKey: true,
      autoIncrement: true
    },
    uniacid: {
      type: DataTypes.INTEGER(10),
      allowNull: false
    },
    sku_id: {
      type: DataTypes.STRING(20),
      allowNull: false,
      defaultValue: ''
    },
    name: {
      type: DataTypes.STRING(80),
      allowNull: false
    },
    price: {
      type: DataTypes.DECIMAL,
      allowNull: false
    },
    stock: {
      type: DataTypes.INTEGER(11),
      allowNull: false,
      defaultValue: '0'
    },
    delete_time: {
      type: DataTypes.INTEGER(11),
      allowNull: true,
      defaultValue: '0'
    },
    category_id: {
      type: DataTypes.INTEGER(11),
      allowNull: true
    },
    main_img_url: {
      type: DataTypes.STRING(255),
      allowNull: true
    },
    from: {
      type: DataTypes.INTEGER(4),
      allowNull: false,
      defaultValue: '1'
    },
    create_time: {
      type: DataTypes.INTEGER(11),
      allowNull: true,
      defaultValue: '0'
    },
    update_time: {
      type: DataTypes.INTEGER(11),
      allowNull: true,
      defaultValue: '0'
    },
    summary: {
      type: DataTypes.TEXT,
      allowNull: true
    },
    img_id: {
      type: DataTypes.INTEGER(11),
      allowNull: true
    },
    sort: {
      type: DataTypes.INTEGER(10),
      allowNull: false
    },
    summary_type: {
      type: DataTypes.INTEGER(4),
      allowNull: false
    },
    attr: {
      type: DataTypes.TEXT,
      allowNull: false
    },
    freight: {
      type: DataTypes.INTEGER(11).UNSIGNED,
      allowNull: false,
      defaultValue: '0'
    },
    weight: {
      type: "DOUBLE(10,2) UNSIGNED",
      allowNull: true,
      defaultValue: '0.00'
    },
    integral: {
      type: DataTypes.TEXT,
      allowNull: true
    },
    individual_share: {
      type: DataTypes.INTEGER(1),
      allowNull: false,
      defaultValue: '0'
    },
    share_commission_first: {
      type: DataTypes.DECIMAL,
      allowNull: false,
      defaultValue: '0.00'
    },
    share_commission_second: {
      type: DataTypes.DECIMAL,
      allowNull: false,
      defaultValue: '0.00'
    },
    share_commission_third: {
      type: DataTypes.DECIMAL,
      allowNull: false,
      defaultValue: '0.00'
    },
    share_type: {
      type: DataTypes.INTEGER(11),
      allowNull: true,
      defaultValue: '0'
    }
  }, {
    tableName: 'ims_crl_tpshop_product'
  });

  Model.associate = function() {

  }

  return Model;
};
